package com.myslef.teaching_platfrom.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.myslef.teaching_platfrom.domain.StudentCourse;
import com.myslef.teaching_platfrom.domain.users.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface StudentCourseMapper extends BaseMapper<StudentCourse> {
    @Select("select u.id, u.uid,u.user_name,sc.create_time from user u join student_course sc on u.id = sc.student_id " +
            " where sc.course_id = #{id}")
    public List<User> getStudentList(Integer id);
}
